package org.ohuyo.libra.server.model.table;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Index;

/**
 * 应锟斤拷票锟捷硷拷录
 * 
 * @author rabbit
 * @time 锟斤拷锟斤拷10:06:09 2009-10-12
 * 
 */
@Entity
@Table(name = "T_APP_TICKET")
@org.hibernate.annotations.Table(appliesTo = "T_APP_TICKET", indexes = {
		@Index(name = "idx_app_ticket1", columnNames = { "LOGIN_TICKET" }),
		@Index(name = "idx_app_ticket2", columnNames = { "app_code","LOGIN_TICKET" }) })
public class AppTicketRecord implements Serializable {

	/**
     *
     */
	private static final long serialVersionUID = -3130762939592611674L;
	/**
	 * 应锟斤拷票锟斤拷
	 */
	@Id
	@TableGenerator(name = "t_app_ticket", table = "t_libra_seq", pkColumnName = "seq_name", pkColumnValue = "t_app_ticket", valueColumnName = "next_value", initialValue = 0, allocationSize = 100)
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "t_app_ticket")
	@Column(name = "APP_TICKET", nullable = false)
	private Long appTicket;
	/**
	 * 锟斤拷陆锟斤拷水
	 */
	@Column(name = "LOGIN_TICKET", nullable = false)
	private Long loginTicket;
	/**
	 * 应锟矫达拷锟斤拷
	 */
	@Column(name = "APP_CODE", columnDefinition = "varchar(20)", nullable = false)
	private String appCode;

	/**
	 * 锟斤拷锟绞憋拷锟�
	 */
	@Column(name = "GEN_TIME", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date genTime;

	public Long getAppTicket() {
		return appTicket;
	}

	public void setAppTicket(Long appTicket) {
		this.appTicket = appTicket;
	}

	public Long getLoginTicket() {
		return loginTicket;
	}

	public void setLoginTicket(Long loginTicket) {
		this.loginTicket = loginTicket;
	}

	public String getAppCode() {
		return appCode;
	}

	public void setAppCode(String appCode) {
		this.appCode = appCode;
	}

	public Date getGenTime() {
		return genTime;
	}

	public void setGenTime(Date genTime) {
		this.genTime = genTime;
	}

}
